package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IAdvancedTaskModel;
import com.wgts.wgts.mvp.model.imp.AdvancedTaskModel;
import com.wgts.wgts.mvp.presenter.IAdvancedTaskPersenter;
import com.wgts.wgts.mvp.presenter.imp.AdvancedTaskPersenter;
import com.wgts.wgts.mvp.view.IAdvancedTaskView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class AdvancedTaskModule {

    private IAdvancedTaskView view;

    public AdvancedTaskModule(IAdvancedTaskView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public IAdvancedTaskView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public IAdvancedTaskModel provideModel(NetService netService){
        return new AdvancedTaskModel(netService);
    }

    @Provides
    @ActivityScope
    public IAdvancedTaskPersenter providePersenter(IAdvancedTaskView view, IAdvancedTaskModel model){
        return new AdvancedTaskPersenter(model, view);
    }
}
